<%@page language="java" contentType="text/html"%>
<%@page import="java.util.Enumeration"%>
<%@page import="java.util.Hashtable"%>
<jsp:useBean id="dataAccess" scope="application"
  class="org.pomirkovany.model.DataAccess"/>
<% String base = (String)application.getAttribute("base"); %>
<div class="menu"> 
    <div class="box">
    <div class="title">Categories</div>
<% 
    Hashtable categories = dataAccess.getCategories();
    Enumeration categoryIds = categories.keys();
    while (categoryIds.hasMoreElements()) {
      Object categoryId = categoryIds.nextElement();
      out.println("<p><a href=" + base + "?action=categorySelect&id="
        + categoryId.toString() + ">" + categories.get(categoryId) + "</a></p>"
        );
      }
  %>
    </div>
  </div>
